package com.aizuda.boot.modules.business.log.domain.entity;

import com.aizuda.boot.modules.common.constant.enums.LogTypeEnum;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @Author sangyirong
 * @ClassName logEntity
 * @Version 1.0
 * @Date 2025/6/5 13:56
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description ="日志实体")
@TableName("operation_log")
public class OperationLogEntity {

    @Schema(description = "日志ID")
    private Long  id;

    @Schema(description = "合同ID")
    private Integer contractId;

    @Schema(description = "事件类型")
    private LogTypeEnum eventType;

    @Schema(description = "操作内容")
    private String operationContent;

    @Schema(description = "操作人ID")
    private Long operatorId;

    @Schema(description = "操作时间")
    private Date operationTime;

    @Schema(description = "操作人IP")
    private String sourceIp;

    @Schema(description = "操作结果")
    private Boolean result;

    @Schema(description = "操作结果失败描述")
    private String errorMessage;
}
